load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "kvfeed",
    srcs = [
        "kv_feed.go",
        "physical_kv_feed.go",
        "scanner.go",
        "testing_knobs.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/changefeedccl/kvfeed",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ccl/changefeedccl/changefeedbase",
        "//pkg/ccl/changefeedccl/kvevent",
        "//pkg/ccl/changefeedccl/schemafeed",
        "//pkg/jobs/jobspb",
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/kv/kvclient/kvcoord",
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/rpc",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/sql/covering",
        "//pkg/storage/enginepb",
        "//pkg/util/admission/admissionpb",
        "//pkg/util/ctxgroup",
        "//pkg/util/hlc",
        "//pkg/util/limit",
        "//pkg/util/log",
        "//pkg/util/mon",
        "//pkg/util/retry",
        "//pkg/util/span",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "kvfeed_test",
    size = "small",
    srcs = [
        "kv_feed_test.go",
        "main_test.go",
        "scanner_test.go",
    ],
    embed = [":kvfeed"],
    deps = [
        "//pkg/base",
        "//pkg/ccl",
        "//pkg/ccl/changefeedccl/changefeedbase",
        "//pkg/ccl/changefeedccl/kvevent",
        "//pkg/ccl/changefeedccl/schemafeed",
        "//pkg/ccl/changefeedccl/schemafeed/schematestutils",
        "//pkg/ccl/storageccl",
        "//pkg/jobs/jobspb",
        "//pkg/keys",
        "//pkg/kv",
        "//pkg/kv/kvclient/kvcoord",
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/desctestutils",
        "//pkg/sql/rowenc/keyside",
        "//pkg/sql/sem/tree",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/ctxgroup",
        "//pkg/util/encoding",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/mon",
        "//pkg/util/randutil",
        "//pkg/util/span",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
